package com.tyjc.unique.bean;

import org.json.JSONException;
import org.json.JSONObject;

public class DLTTrendChart {

	private int id;

	private int lotteryType;

	private String phase;

	private String value;

	private String wincode;

	public void setId(int id) {
		this.id = id;
	}

	public int getId() {
		return this.id;
	}

	public void setLotteryType(int lotteryType) {
		this.lotteryType = lotteryType;
	}

	public int getLotteryType() {
		return this.lotteryType;
	}

	public void setPhase(String phase) {
		this.phase = phase;
	}

	public String getPhase() {
		return this.phase;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getValue() {
		return this.value;
	}

	public void setWincode(String wincode) {
		this.wincode = wincode;
	}

	public String getWincode() {
		return this.wincode;
	}

	public String[] hongMiss() {
		String[] missNum = null;
		try {
			JSONObject  obj = new JSONObject(value);
			JSONObject hongM = obj.getJSONObject("dlt");
			String red = hongM.getString("qian");
			red =  red.subSequence(1, red.length()-1).toString();
			missNum = red.split(",");
		} catch (JSONException e) {
			e.printStackTrace();
		}
		return missNum;
	}

	public String[] lanMiss() {
		String[] missNum = null; 
		try {
			JSONObject  obj = new JSONObject(value);
			JSONObject hongM = obj.getJSONObject("dlt");
			String red = hongM.getString("hou");
			red.subSequence(1, red.length()-1);
			red =  red.subSequence(1, red.length()-1).toString();
			missNum = red.split(",");
		} catch (JSONException e) {
			e.printStackTrace();
		}
		return missNum;
	}

}
